package com.cellulam.framework.core.model;

import lombok.Getter;

import java.util.function.Consumer;

@Getter
public class ExecuteCallback {
    public ExecuteCallback(Runnable completedHandler, Consumer<Exception> exceptionHandler) {
        this.exceptionHandler = exceptionHandler;
        this.completedHandler = completedHandler;
    }

    public ExecuteCallback( Consumer<Exception> exceptionHandler) {
        this(null, exceptionHandler);
    }

    public ExecuteCallback(Runnable completedHandler) {
        this(completedHandler, null);
    }

    private Consumer<Exception> exceptionHandler;
    private Runnable completedHandler;
}
